package models

// PromotionCount 推广统计
type PromotionCount struct {
	ID        string `json:"id" gorm:"column:id;primaryKey;type:int;size:64;comment:主键"`
	Name      string `json:"name" gorm:"column:name;type:string;size:30;comment:推广名称"`
	AppID     string `json:"app_id" gorm:"column:app_id;type:string;size:50;comment:小程序id"`
	URI       string `json:"uri" gorm:"column:uri;type:string;size:200;comment:跳转路径"`
	Params    string `json:"params" gorm:"column:params;type:string;size:100;comment:跳转参数"`
	Count     int64  `json:"count" gorm:"column:count;type:int;size:64;default:0;comment:推广计数"`
	CreatedAt int64  `json:"created_at" gorm:"autoCreateTime;column:created_at;type:int;size:64;comment:创建时间"`
	UpdatedAt int64  `json:"updated_at" gorm:"autoUpdateTime;column:updated_at;type:int;size:64;comment:更新时间"`
}

// TableName 表名称
func (PromotionCount) TableName() string {
	return "promotion_count"
}

// 模式自动注册
func init() {
	Models = append(Models, &PromotionCount{})
}
